home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / ENTRPRIS / HELLO / HELO_SVR.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-11-23  |  1.9 KB  |  47 lines

  1. VERSION 5.00
  2. Begin VB.Form frmHello 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "HelloWorld Server"
  5.    ClientHeight    =   1110
  6.    ClientLeft      =   3150
  7.    ClientTop       =   2325
  8.    ClientWidth     =   2820
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   1110
  14.    ScaleWidth      =   2820
  15. Attribute VB_Name = "frmHello"
  16. Attribute VB_GlobalNameSpace = False
  17. Attribute VB_Creatable = False
  18. Attribute VB_TemplateDerived = False
  19. Attribute VB_PredeclaredId = True
  20. Attribute VB_Exposed = False
  21. Option Explicit
  22. Private Sub Form_Load()
  23. 'Note1: The following two segments of code demonstrate two options
  24. 'for instantiating an object by a client... the first one uses early binding
  25. 'and requires "HelloProj" to be referenced from the Tools.References
  26. 'dialog.  the second option uses late binding and requires an
  27. 'additional statement to create the object.  Early binding is faster
  28. 'than late binding... but late binding gives the designer greater flexibility
  29. 'in deciding at runtime what objects are to be used.
  30. 'Note2:  This client code is present in this project to facilitate debugging.
  31. 'The code can be used in this (server) project to verify syntax and
  32. 'basic functionality.  It can then be pasted into a separate client
  33. 'project and 'used *without* changes to access the server from an
  34. 'external executable.  The fact that object creation is identical across
  35. 'internal and external project boundaries can greatly facilitate testing
  36. 'and code sharing.
  37. 'Early binding option
  38. 'Dim objNew As New HelloProj.HelloClass
  39. 'MsgBox objNew.SayHello
  40. 'Set objNew = Nothing
  41. 'Late binding option
  42. 'Dim objNew As Object
  43. 'Set objNew = CreateObject("HelloProj.HelloClass")
  44. 'MsgBox objNew.SayHello
  45. 'Set objNew = Nothing
  46. End Sub
  47.